<template>
  <el-row id="home" :gutter="20">
    <m-card :span="8" :to="{name:'subject'}">
      <div>
        <img src="../../assets/image/tiku.png" alt="">
        题库
      </div>
    </m-card>
    <m-card :span="8" :to="{name:'history'}">
      <div>
        <img src="../../assets/image/defen.png" alt="">
        做题记录
      </div>
    </m-card>
    <m-card class="undone" :span="8">
      <div>
        <img src="../../assets/image/cuotiku.png" alt="">
        我的错题
      </div>
    </m-card>
    <m-card class="undone" :span="8">
      <div>
        <img src="../../assets/image/shoucang.png" alt="">
        我的收藏
      </div>
    </m-card>
  </el-row>
</template>

<script>
  export default {
    name: "home",
  }
</script>

<style scoped>
  img {
    width: 100%;
  }

  .el-card__body img {
    width: 48px;
    margin-right: 15px;
  }

  .el-card__body div {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
  }

  .undone >>> .el-card {
    cursor: pointer;
    user-select: none;
    position: relative;
    overflow: hidden;
  }

  .undone >>> .el-card:hover:after {
    transform: rotate(-45deg) translate(0px, 0px);
  }

  .undone >>> .el-card:after {
    content: '敬请期待';
    position: absolute;
    bottom: -30px;
    right: -40px;
    background: orange;
    color: white;
    height: 100px;
    transform: rotate(-45deg) translate(0px, 100px);
    line-height: 50px;
    width: 180px;
    text-align: center;
    transition: all .2s;
  }
</style>
